%=======================================================================================================
% This contain all the information for running main
% TEMPLATE OF THE STRUCT DATI
%=======================================================================================================
%
%  DATI= struct( 'name',              % set the name of the test
%                'Domain',            % set the domain [x1,x2;y1,y2]
%                'exact_sol',         % set the exact solution
%                'force',             % set the spatial load
%                'grad_exact_1',      % set the first componenet of the gradient of the exact solution
%                'grad_exact_2',      % set the second componenet of the gradient of the exact solution
%                'fem',               % set kind of finite elements
%                'nqn_1D',            % number of quadrature nodes for integrals over lines
%                'nqn_2D',            % number of quadrature nodes for integrals over elements
%                'MeshType',          % set the elements of the mesh  'TS'
%                'refinement_vector', % set the level of refinement for the grid
%                'visual_graph',      % if you want to display the graphical results ['Y','N']
%                'print_out',         % if you want to print out the results ['Y','N']
%                'plot_errors'        % you want to plot the computed errors ['Y','N']
%
%========================================================================================================

function [DATI]=C_dati(test)

if test=='Test1'
    DATI= struct(  'name',             test,...
        'domain',           [0,2*pi;0,2*pi],...
        'exact_sol',        '0',...
        'force',            '0.4*12e-6*sin(x)/0.000017',...
        'grad_exact_1',     '2*pi*cos(2*pi*x).*sin(2*pi*y)',...
        'grad_exact_2',     '2*pi*sin(2*pi*x).*cos(2*pi*y)',...
        'obstacle',         '0.*x.*y',...
        'nu_fun',           '(12e-6*(1+0.4*cos(x))/0.000017).^3',...
        'sigma',             1,...
        'beta',             [0,0],...
        'fem',              'P2',...         % Q1 - P1
        'nqn_1D',            4,...           % (1,2,3,4,5,6,.....)
        'nqn_2D',            3,...          % (1,3,4,7,10,16,64)
        'MeshType',         'TS', ...        % ['TS' 'TU' 'QS' 'QU']
        'refinement_vector', [3,4,5,6],...   % [0,1,2,3,4,5,6,7,....]
        'visual_graph',      'Y',...
        'print_out',         'Y',...
        'plot_errors',       'Y');
    
elseif test=='Test2'
    DATI= struct('name',    test,...
        'domain',           [0,1;-1,1],...
        'exact_sol',        '(((1-4*(1 - sqrt(3) / 2)^2) / ((1 - sqrt(3) / 2)-1)) * (-y-1)) .* (y >= -1 & y <= -(1 - sqrt(3) / 2)) +(1-4*y.^2) .* (y >= -(1 - sqrt(3) / 2) & y <= (1 - sqrt(3) / 2)) + ((1-4*(1 - sqrt(3) / 2)^2) / (1-(1 - sqrt(3) / 2)) * (-y+1)) .* (y >= (1 - sqrt(3) / 2) & y <= 1) + 0.*x',...
        'force',            '0.*x.*y',...
        'grad_exact_1',     '0.*x.*y',...
        'grad_exact_2',     '(((1-4*(1 - sqrt(3) / 2)^2) / ((1 - sqrt(3) / 2)-1)) * (-1)) .* (y >= -1 & y <= -(1 - sqrt(3) / 2)) +(-8*y) .* (y >= -(1 - sqrt(3) / 2) & y <= (1 - sqrt(3) / 2)) + ((1-4*(1 - sqrt(3) / 2)^2) / (1-(1 - sqrt(3) / 2)) * (-1)) .* (y >= (1 - sqrt(3) / 2) & y <= 1) + 0.*x',...
        'obstacle',         '1-4*y.^2 + 0.*x',...
        'nu_fun',           '1 + 0.*x.*y',...
        'sigma',             1,...
        'beta',             [0,0],...
        'fem',              'P2',...         % Q1 - P1
        'nqn_1D',            4,...           % (1,2,3,4,5,6,.....)
        'nqn_2D',            3,...          % (1,3,4,7,10,16,64)
        'MeshType',         'TS', ...        % ['TS' 'TU' 'QS' 'QU']
        'refinement_vector', [2,3,4,5,6],...   % [0,1,2,3,4,5,6,7,....]
        'visual_graph',      'Y',...
        'print_out',         'Y',...
        'plot_errors',       'Y');
    
end


 

